<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div>
        <input type="radio" id="huey" name="drone" value="huey" checked />
        <label for="huey">Huey</label>
    </div>

    <div>
        <input type="radio" id="dewey" name="drone" value="dewey" />
        <label for="dewey">Dewey</label>
    </div>

    <div>
        <input type="radio" id="louie" name="drone" value="louie" />
        <label for="louie">Louie</label>
    </div>

    <button onclick="checkRadio()">检查</button>
</body>

<script>

    checkRadio = () => {
        const radioList = document.getElementsByName('drone');
        radioList.forEach(element => {
            if (element.checked) {
                console.log(element.value);
            }
        });
        // console.log(document.getElementById('huey'));

    }


</script>

</html>